package com.iraeta.entity.main.vo;

import com.iraeta.entity.main.TreeNode;
import com.iraeta.entity.main.PermissionType;
import java.util.ArrayList;

public class SysPermission {
    public static ArrayList<TreeNode> getPermissionTreeNode(){
        TreeNode cs_Node = new TreeNode(String.valueOf(PermissionType.cs), "现存量管理");
        TreeNode cs_currentStore_Node = new TreeNode(String.valueOf(PermissionType.cs_currentStore), "库存现存量");
        TreeNode cs_shujutongbu_Node = new TreeNode(String.valueOf(PermissionType.cs_shujutongbu), "数据同步");
        TreeNode cs_scancode_Node = new TreeNode(String.valueOf(PermissionType.cs_scancode), "二维码打印");
        cs_Node.addNode(cs_currentStore_Node);
        cs_Node.addNode(cs_shujutongbu_Node);
        cs_Node.addNode(cs_scancode_Node);

        TreeNode pddata_Node = new TreeNode(String.valueOf(PermissionType.pddata), "盘点管理");
        TreeNode pddata_pdnow_Node = new TreeNode(String.valueOf(PermissionType.pddata_pdnow), "盘点数据");
        TreeNode pddata_pdrecordsnapshot_Node = new TreeNode(String.valueOf(PermissionType.pddata_pdrecordsnapshot), "盘点记录生成");
        TreeNode pddata_clearpd_Node = new TreeNode(String.valueOf(PermissionType.pddata_clearpd), "清空盘点");
        TreeNode pddata_pandian_Node = new TreeNode(String.valueOf(PermissionType.pddata_pandian), "盘点填报");
        pddata_Node.addNode(pddata_pdnow_Node);
        pddata_Node.addNode(pddata_pdrecordsnapshot_Node);
        pddata_Node.addNode(pddata_clearpd_Node);
        pddata_Node.addNode(pddata_pandian_Node);

        TreeNode cangku_Node = new TreeNode(String.valueOf(PermissionType.cangku), "仓库管理");
        TreeNode cangku_manager_Node = new TreeNode(String.valueOf(PermissionType.cangku_manager), "仓库人员设置");
        TreeNode cangku_kclock_Node = new TreeNode(String.valueOf(PermissionType.cangku_kclock), "仓库锁定");
        //TreeNode cangku_kclockall_Node = new TreeNode(String.valueOf(PermissionType.cangku_kclockall), "全局仓库锁定");
        cangku_Node.addNode(cangku_manager_Node);
        cangku_Node.addNode(cangku_kclock_Node);
        //cangku_Node.addNode(cangku_kclockall_Node);

        TreeNode snapshot_Node = new TreeNode(String.valueOf(PermissionType.snapshot), "盘点记录");
        TreeNode snapshot_sleflist_Node = new TreeNode(String.valueOf(PermissionType.snapshot_sleflist), "盘点记录查看");
        TreeNode snapshot_alllist_Node = new TreeNode(String.valueOf(PermissionType.snapshot_alllist), "全局盘点记录查看");
        snapshot_Node.addNode(snapshot_sleflist_Node);
        snapshot_Node.addNode(snapshot_alllist_Node);

        TreeNode plan_Node = new TreeNode(String.valueOf(PermissionType.plan), "盘点计划");
        TreeNode snapshot_planadmin_Node = new TreeNode(String.valueOf(PermissionType.planadmin), "盘点计划管理");
        TreeNode snapshot_planchakan_Node = new TreeNode(String.valueOf(PermissionType.planchakan), "盘点计划查看");
        plan_Node.addNode(snapshot_planadmin_Node);
        plan_Node.addNode(snapshot_planchakan_Node);

        ArrayList<TreeNode> res = new ArrayList<TreeNode>();
        res.add(cs_Node);
        res.add(pddata_Node);
        res.add(cangku_Node);
        res.add(snapshot_Node);
        res.add(plan_Node);
        return res;
    }
}
